package com.minibobbo.utilities.spe.physicsmodules;

public class SpePhysicsDestroyOnTouch extends SpePhysicsModule {

	@Override
	public void updatePhysics(float delta) {
		parent.physicsVector.add(e.getGravity().cpy().mul(delta));

		parent.destination.y += parent.changeVector.cpy().mul(delta).y;
		parent.destination.y += parent.physicsVector.cpy().mul(delta).y;

		parent.destination.x += parent.changeVector.cpy().mul(delta).x;
		parent.destination.x += parent.physicsVector.cpy().mul(delta).x;

		if(e.getCurrentMap().getTileContact(parent.loc.getCenter().x, parent.loc.getCenter().y))
			parent.dispose();
	}

	}
